package com.favccxx.search.domain.datasource.datasource;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author favccxx
 */
@Service
public class IDataSourceService {

    @Autowired
    AbstractDataSourceRepo dataSourceRepo;

    public void saveJdbcDataSource(JdbcDataSource jdbcDataSource) {
        dataSourceRepo.save(jdbcDataSource);
    }

    public List<AbstractDataSource> findAll() {
        return dataSourceRepo.findAll();
    }

    AbstractDataSource findByCode(String code) {
        return dataSourceRepo.findByCode(code);
    }

}
